package jdbc1;

import jdbc.DBUtil;

import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;

public class Text {
    public static void main(String[] args) {
        try (
                Connection connection = DBUtil.getConnection();
        ){
            Statement state = connection.createStatement();
            String sql = "CREATE TABLE student1(" +
                         " id INT AUTO_INCREMENT PRIMARY KEY," +
                         " name VARCHAR(30)," +
                         " age INT(3)," +
                         " class_id INT" +
                         ")";
            state.execute(sql);
            System.out.println("执行完毕");
        } catch (SQLException e) {
            e.printStackTrace();
        }
    }
}
